home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / misc / ImageFXDevKit.lha / sdev / include / scan / dither.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-30  |  1.4 KB  |  39 lines

  1. /*
  2.  * Structures and defines for using the Dither Module.
  3.  */
  4.  
  5. struct DitherArgs {
  6.    short          X1, Y1;                    /* Starting corner */
  7.    short          Width, Height;             /* Area to work on */
  8.    short         (*CB_NewLine)               /* Called to start each line */
  9.                   (short wid,
  10.                    short row);
  11.    short         (*CB_Quantize)              /* Find closest palette entry */
  12.                   (short r, short g, short b,
  13.                    short *qr, short *qg, short *qb);
  14.    void          (*CB_PutLine)               /* Output a line of RGB data */
  15.                   (UWORD *outline,
  16.                    short xoffs,
  17.                    short wid,
  18.                    short row);
  19.    LONG           Type;                      /* Type of dither (index) */
  20.    LONG           Direction;                 /* Direction of dither (index) */
  21.    LONG           Limit;                     /* Error limit (index) */
  22.    short          Bits;                      /* Output color depth */
  23. };
  24.  
  25. /* void    CB_NewLine (short width, short row) */
  26. /* color = CB_Quantize (short r, g, b, short &qr, &qg, &qb) */
  27. /* void    CB_PutLine (UWORD *outline, short xoffs, short wid, short row) */
  28.  
  29. #define DF_FWD             (0x0000)
  30. #define DF_BACK            (0x8000)
  31. #define DF_ZIGZAG          (0x4000)
  32.  
  33.  
  34. #ifndef NO_DITHER_DEFINES
  35. #define DM_NewDither       DoDither
  36. #define DM_InitDither      InitDither
  37. #define DM_FreeDither      FreeDither
  38. #endif
  39.